package Demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-06-05
 * Time: 16:25
 */
public class Dog extends Animal{
    public Dog(String name){
        super(name);
    }
    @Override
    public void eat(){
        System.out.println(name+"正在吃狗粮。。。");
    }

    public static void fun(Animal animal){
        animal.eat();
    }
    public static void main(String[] args) {
        Dog dog=new Dog("小黑");
        fun(dog);

    }
}
